package uml.structural.adapter.ext.duplex;

/**
 * 双向适配器--双向适配器<br>
 * on 2022/12/23 1:45
 */
public class DuplexAdapter implements Target, Adaptee {
    private Target target;
    private Adaptee adaptee;

    public DuplexAdapter() {
        target=new ConcreteTarget();
        adaptee=new ConcreteAdaptee();
    }

    @Override
    public void existedService() {
        target.targetService();
    }

    @Override
    public void targetService() {
        adaptee.existedService();
    }
}
